package com.jhgk.jhcee.data.auth.mapper;

import com.jhgk.jhcee.data.auth.entity.SysRoleResourceRelation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @Description：角色资源关联Mapper接口
*/
public interface SysRoleResourceRelationMapper extends BaseMapper<SysRoleResourceRelation> {

    List<Long> selectListByResourceId(@Param("resourceId") Long resourceId);

    Boolean deleteByParamList(@Param("roleId") Long roleId,@Param("resourceIds") List<Long> resourceIds);

    Boolean deleteByParamOne(@Param("roleId") Long roleId,@Param("resourceId") Long resourceId);

    Integer addRoleResourceRelation(@Param("roleId") Long roleId,@Param("resourceIds") List<Long> resourceIds);

    Integer addRolesResource(@Param("roleIds") List<Long> roleId,@Param("resourceId") Long resourceId);

    Boolean deleteRolesResource(@Param("roleIds") List<Long> roleIds,@Param("resourceId") Long resourceId);
}

